Glofa CNET2 communication driver

 

Glofa CNET2 Glofa CNET communication driver is the driver to communicate with GLOFA GM series PLC of CUEA serial(232/422/485) of LSIS Co., Ltd. in Korea.

 

1. Read settings

 

<Figure 1> is read setting example of Glofa CNET2 communication driver. 

<Figure 1>  Read setting example of Glofa CNET2 communication driver

Device part of  <Figure 1> input Com Port(COM1), Baud Rate(9600), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively according to setting of PLC.

 

Note) Glofa PLC's default communication setting are 38400, 0, 8, 1.

Baud rate, parity bit, data bit, stop bit can change by using 'Frame Editor' of LSIS.

 

Glofa CNET2 communication driver read schedule

Read schedule setting parameters are as follows:

1) STATION – PLC station number = 0(default) ~ 31.

2) Read memory type – Memory type =MW, MF2, MD, MF2, MF, IW, ID, IF, QW, QD, QF. ( Refer to <Table 1> )

3) Read start address – Read start address in memory.

4) Save Start Address for Communication Server – saveing start address of Communication Server.

5) Read Size – Word/Dword/Float unit read size.      Word = 1 ~ 60, Dword/Float = 1 ~ 30.

6) Base number – 0 ~ 127 Base number when I, Q memory.

7) Slot number – 0 ~ 15 Slot number when I, Q memory.

 

Read schedule example)

READ,    0,   IW,   0,   0,  2,   0,   1,

READ,    0,   QW,   0,   2,  2,   0,   2,

READ,    0,   MW,   0,  16,  16,

DWORD, 0,   MD, 100,  0,  16,

 

<Table 1> is memory type and contents of Glofa PLC.

Memory type Contents Read/Write Remarks

MX

Bit(write only), Word, Dword, Float unit read and write for M memory

R/W

Don't support read MX, IX, QX

MW

MD

MF

MF2

 Float(Hi, Lo order) unit read and write for M memory

IX

Bit, Word, Dword, Float unit read for I memory

R

IW

ID

IF

QX

Bit(write only), Word, Dword, Float unit read and write for Q memory

R/W

QW

QD

QF

<Table 1> Memory type and contents of Glofa PLC

If you click the icon  in protocol option part, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part. 

<Figure 2> Example of Glofa CNET2 communication driver¡¯s Option dialogue box

 You can set read schedule by using , , button and listbox of <Figure 2>.  

<Figure 3> Example of Glofa CNET2 communication driver¡¯s read schedule Add/Edit dialogue box

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Writing settings

You can set Glofa PLC by using write settings.

 

Digital Write

Digital write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             PLC station number = 0 ~ 31.

3)  ADDRESS          Write address in memory.

MX memory type : decimal unit write address,

MW memory type : upper 2 ~ 6 digit = decimal unit Word address,     lower 1 digit = 0 ~ F bit position,

QX memory type : upper 2 ~ 6 digit = Slot number,    lower 2 digit = Point number.

4)  Extra1                   Write memory type = MX, MW, QX, etc.

5)  Extra2                   Base number when Q memory type or multi bit write setting,

QX memory type : decimal unit base number,

other memory type : multi digital(bit) write setting,

1 = save multi digital write data, ( Extra1 = don't care when this case )

2 = multi digital write execute for currently saved data, ( multi digital write from input address by saved data count )

3  = delete all saved multi digital write data, ( Extra1 = don't care when this case )

0 or etc = normal digital(bit) write.

 

Write example 1) 

PORT : 0  Station : 0, ADDRESS : 0000, EXTRA1 : MX,  EXTRA2 :

The setting parameter shown above is a control(On/Off) example for %MX0000.

 

Write example 2) 

PORT : 0  Station : 0, ADDRESS : 0050, EXTRA1 : MX,  EXTRA2 :

The setting parameter shown above is a control(On/Off) example for %MX0050.

 

Write example 3) 

PORT : 0  Station : 0, ADDRESS : 11215, EXTRA1 : MX,  EXTRA2 :

The setting parameter shown above is a control(On/Off) example for%MX11215(%MW0700.F).

 

Write example 4) 

PORT : 0  Station : 0, ADDRESS : 700F, EXTRA1 : MW,  EXTRA2 :

The setting parameter shown above is a control(On/Off) example for %MW0700.F( MX = 700 * 16 + 15 = 11215).

 

Write example 5) 

PORT : 0  Station : 0, ADDRESS : 0203, EXTRA1 : QX,  EXTRA2 : 0

The setting parameter shown above is a control(On/Off) example for 0 Base, 2 Slot, 3 point number of Q memory type.( %QX0.2.3 )

  

Script example for multi digital write)

$DO_0000.Extra2 = 3;                                            //delete saved multi digital write data

@SetTagValue("DO_0000", 0);

 

$DO_0000.Extra2 = 1;                                            // setting of save multi digital write data

for(i = 0; i < 16; i = i + 1) {

   @sprintf($DO_0000.Extra1, "%03d", i);             // input arbitraty value to Extra1, so don't ignore the equal data

   @SetTagValue("DO_0000", 1);                           // save multi digital write data, output value = 1(ON)

}

@sprintf($DO_0000.Extra1, "MX");                         // don't care memory type, MX, MW, ...

$DO_0000.Extra2 = 2;                                              // setting of multi digital write

@SetTagValue("DO_0000", 1);                               // execute multi digital write from saved data to internal memory, saved data count = 16,   write memory type = MX

  

Analog Write

Analog write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             PLC station number = 0 ~ 31.

3)  ADDRESS          Bit, word, dword, float unit write address in memory.

4)  Extra1                   Write memory type = MX( equal with digital write ), MW, MD, MF, MF2, QX(equal with digital write ), QW, QD, QF, etc.

5)  Extra2                   multi word, dword, float write setting.

1 = save multi word, dword, float write data, ( Extra1 = don't care when this case )

2 = multi word, dword, float write execute for currently saved data, ( multi word, dword, float write from input address by saved data count )

3  = delete all saved multi word, dword, float write data, ( Extra1 = don't care when this case )

0 or etc = normal analog(digital) write.

 

Write example 1) 

PORT : 0  Station : 0, ADDRESS : 0000, EXTRA1 : MW,  EXTRA2 :

The setting parameter shown above is word write example for 0000 word of M memory type.( %MW0000 )

 

Write example 2) 

PORT : 0  Station : 0, ADDRESS : 0031, EXTRA1 : MW,  EXTRA2 :

The setting parameter shown above is word write example for 0031 word of M memory type.( %MW0031 )

 

Write example 3) 

PORT : 0  Station : 0, ADDRESS : 0012, EXTRA1 : MD,  EXTRA2 :

The setting parameter shown above is double word write example for 0012 double word of M memory type.( %MD0012 )

 

Write example 4) 

PORT : 0  Station : 0, ADDRESS : 0125, EXTRA1 : MF,  EXTRA2 :

The setting parameter shown above is float write example for %MD0125 double word data that changed to float data.

 

 Script example for multi analog write)

$AO_0000.Extra2 = 3;                                            //delete saved multi analog write data

@SetTagValue("AO_0000", 0);

 

$AO_0000.Extra2 = 1;                                            // setting of save multi analog write data

for(i = 0; i < 25; i = i + 1) {

   @sprintf($AO_0000.Extra1, "%03d", i);             // input arbitraty value to Extra1, so don't ignore the equal data

   @SetTagValue("AO_0000", 5000);                    // save multi analog write data, output value = 5000

}

@sprintf($AO_0000.Extra1, "MW");                      // don't care memory type, MW, MD, MF, ...

$AO_0000.Extra2 = 2;                                             // setting of multi analog write

@SetTagValue("AO_0000", 1);                              // execute multi analog write from saved data to internal memory, saved data count = 25,   write memory type = MW

 

3. Connectoin of communication cable

Please connect full RS-232C Serial communication cable for GLOFA PLC such as <Figure 2>.  

<Figure 2>  RS-232C communication cable for Glofa CNET communication driver
4. Check point when communication error

1) Check 'Mode switch' of CNET communication module. You have to set 'dedicated communication mode' of Mode switch. ( can't communicate when 'User define Mode' or 'Test Mode')

Please refer to reference manual of GLOFA PLC for more information.

2) Please check the connection of communication cable. It can't communicate when you using 'communication cable for Ladder'.

3) Check station number of PLC.

4) Check baud rate of PLC and driver setting for Glofa CNET communication driver.

Baud rate can set by using 'Frame Editor'.